Optimal. Leaf size=158 \[ a^5 x+\frac {b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a b^2 \left (53 a^2+20 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^3 \left (58 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3867, 4141,
4133, 3855, 3852, 8} \begin {gather*} a^5 x+\frac {a b^2 \left (53 a^2+20 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^3 \left (58 a^2+9 b^2\right ) \tan (c+d x) \sec (c+d x)}{24 d}+\frac {b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {11 a b^2 \tan (c+d x) (a+b \sec (c+d x))^2}{12 d}+\frac {b^2 \tan (c+d x) (a+b \sec (c+d x))^3}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3867
Rule 4133
Rule 4141
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^5 \, dx &=\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{4} \int (a+b \sec (c+d x))^2 \left (4 a^3+3 b \left (4 a^2+b^2\right ) \sec (c+d x)+11 a b^2 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{12} \int (a+b \sec (c+d x)) \left (12 a^4+a b \left (48 a^2+31 b^2\right ) \sec (c+d x)+b^2 \left (58 a^2+9 b^2\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b^3 \left (58 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{24} \int \left (24 a^5+3 b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \sec (c+d x)+4 a b^2 \left (53 a^2+20 b^2\right ) \sec ^2(c+d x)\right ) \, dx\\ &=a^5 x+\frac {b^3 \left (58 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{6} \left (a b^2 \left (53 a^2+20 b^2\right )\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{8} \left (b \left (40 a^4+40 a^2 b^2+3 b^4\right )\right ) \int \sec (c+d x) \, dx\\ &=a^5 x+\frac {b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {b^3 \left (58 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}-\frac {\left (a b^2 \left (53 a^2+20 b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{6 d}\\ &=a^5 x+\frac {b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a b^2 \left (53 a^2+20 b^2\right ) \tan (c+d x)}{6 d}+\frac {b^3 \left (58 a^2+9 b^2\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {11 a b^2 (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.62, size = 114, normalized size = 0.72 \begin {gather*} \frac {24 a^5 d x+3 b \left (40 a^4+40 a^2 b^2+3 b^4\right ) \tanh ^{-1}(\sin (c+d x))+3 b^2 \left (40 a \left (2 a^2+b^2\right )+b \left (40 a^2+3 b^2\right ) \sec (c+d x)+2 b^3 \sec ^3(c+d x)\right ) \tan (c+d x)+40 a b^4 \tan ^3(c+d x)}{24 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 160, normalized size = 1.01
method | result | size |
derivativedivides | \(\frac {a^{5} \left (d x +c \right )+5 b \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+10 b^{2} a^{3} \tan \left (d x +c \right )+10 b^{3} a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-5 b^{4} a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+b^{5} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(160\) |
default | \(\frac {a^{5} \left (d x +c \right )+5 b \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+10 b^{2} a^{3} \tan \left (d x +c \right )+10 b^{3} a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-5 b^{4} a \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+b^{5} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(160\) |
norman | \(\frac {a^{5} x +a^{5} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 a^{5} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 a^{5} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 a^{5} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {5 b^{2} \left (16 a^{3}-8 b \,a^{2}+8 b^{2} a -b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {5 b^{2} \left (16 a^{3}+8 b \,a^{2}+8 b^{2} a +b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {b^{2} \left (720 a^{3}-120 b \,a^{2}+200 b^{2} a +9 b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {b^{2} \left (720 a^{3}+120 b \,a^{2}+200 b^{2} a -9 b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {b \left (40 a^{4}+40 b^{2} a^{2}+3 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {b \left (40 a^{4}+40 b^{2} a^{2}+3 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(329\) |
risch | \(a^{5} x -\frac {i b^{2} \left (120 b \,a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+9 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-240 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+120 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+33 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-720 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-240 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-120 b \,a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-33 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-720 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-320 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-120 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-9 b^{3} {\mathrm e}^{i \left (d x +c \right )}-240 a^{3}-80 b^{2} a \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {5 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{4}}{d}-\frac {5 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d}-\frac {3 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {5 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{4}}{d}+\frac {5 b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d}+\frac {3 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) | \(363\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 198, normalized size = 1.25 \begin {gather*} a^{5} x + \frac {5 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a b^{4}}{3 \, d} - \frac {b^{5} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{16 \, d} - \frac {5 \, a^{2} b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{2 \, d} + \frac {5 \, a^{4} b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right )}{d} + \frac {10 \, a^{3} b^{2} \tan \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.18, size = 183, normalized size = 1.16 \begin {gather*} \frac {48 \, a^{5} d x \cos \left (d x + c\right )^{4} + 3 \, {\left (40 \, a^{4} b + 40 \, a^{2} b^{3} + 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (40 \, a^{4} b + 40 \, a^{2} b^{3} + 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (40 \, a b^{4} \cos \left (d x + c\right ) + 6 \, b^{5} + 80 \, {\left (3 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (40 \, a^{2} b^{3} + 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{5}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 380 vs.
\(2 (148) = 296\).
time = 0.47, size = 380, normalized size = 2.41 \begin {gather*} \frac {24 \, {\left (d x + c\right )} a^{5} + 3 \, {\left (40 \, a^{4} b + 40 \, a^{2} b^{3} + 3 \, b^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (40 \, a^{4} b + 40 \, a^{2} b^{3} + 3 \, b^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (240 \, a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 120 \, a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 120 \, a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 720 \, a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 200 \, a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 720 \, a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 200 \, a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 240 \, a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.36, size = 274, normalized size = 1.73 \begin {gather*} \frac {2\,a^5\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,b^5\,\sin \left (c+d\,x\right )}{8\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {b^5\,\sin \left (c+d\,x\right )}{4\,d\,{\cos \left (c+d\,x\right )}^4}+\frac {10\,a\,b^4\,\sin \left (c+d\,x\right )}{3\,d\,\cos \left (c+d\,x\right )}+\frac {5\,a\,b^4\,\sin \left (c+d\,x\right )}{3\,d\,{\cos \left (c+d\,x\right )}^3}+\frac {10\,a^3\,b^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {5\,a^2\,b^3\,\sin \left (c+d\,x\right )}{d\,{\cos \left (c+d\,x\right )}^2}-\frac {b^5\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,3{}\mathrm {i}}{4\,d}-\frac {a^2\,b^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,10{}\mathrm {i}}{d}-\frac {a^4\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,10{}\mathrm {i}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________